var myfs = require("./_include/fs");
var jslist = myfs.ls(__dirname + "/../middleware");
var eventlist = jslist.filter(function(fileName) {
	var suffix = ".on.js"
	return fileName.toLowerCase().substr(-suffix.length) == suffix;
});
module.exports = function(app) {
	eventlist.forEach(function(fileName) {
		require(fileName);
	});
	console.log("系统事件注册成功");
};